package com.infore.gateway.main;

import com.infore.gateway.main.filter.ratelimiter.resolver.HostAddrKeyResolver;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

/**
 * @Discription TODO
 * @Autor lijh
 * @Date 2021/12/30 9:40
 */
@SpringBootApplication(scanBasePackages = {"com.infore"})
//@EnableEurekaClient
@EnableDiscoveryClient
public class GatewayApplication  implements CommandLineRunner {

    public static void main(String[] args){
        SpringApplication.run(GatewayApplication.class,args);
    }

    @Bean
    public HostAddrKeyResolver hostAddrKeyResolver() {
        return new HostAddrKeyResolver();
    }
    @Override
    public void run(String... args) throws Exception {
        System.out.println("-------------Gateway service started successfully----------------");
    }


}
